<template>
  <div class="home">
    <h1>This is a home page</h1>

    <!-- 静态写法 -->
    <!-- <router-link :to="{ name: 'clothing' }">服装</router-link>
    <hr />
    <router-link :to="{ name: 'men-wear' }">男装</router-link> - 
    <router-link :to="{ name: 'shirt' }">衬衫</router-link>
    <hr />
    <router-link :to="{ name: 'women-wear' }">女装</router-link> -
    <router-link :to="{ name: 'skirt' }">裙子</router-link> -->
    <!-- 不用name路径就很长 -->
    <!-- <router-link to="/clothing/women-wear/skirt">裙子</router-link> -->
    <!-- <hr />
    <router-link :to="{ name: 'liquor' }">酒类</router-link>
    <hr />
    <router-link :to="{ name: 'medicine' }">医药</router-link> -->

    <!-- 列表循环 -->
    <li v-for="item in $store.state.authList" :key="item.name">
      <router-link :to="{name:item.auth,params:{id:item.id}}">{{item.name}}</router-link>
    </li>
  </div>
</template>

<script>
export default {
  name: "home",
};
</script>
